//
//  Fraction.h
//  OC3_继承课后作业
//
//  Created by dllo on 15/10/26.
//  Copyright (c) 2015年 dllo. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface Fraction : NSObject

{
    NSInteger _fenzi;
    NSInteger _fenmu;

}

- (NSInteger)fenzi;

- (void)setFenzi:(NSInteger)fenzi;

- (NSInteger)fenmu;

- (void)setFenmu:(NSInteger)fenmu;

- (id)initWithFenzi:(NSInteger)fenzi fenmu:(NSInteger)fenmu;

+ (id)frationWithFenzi:(NSInteger)fenzi fenmu:(NSInteger)fenmu;

- (void)info:(Fraction *)a;    // 打印

- (id)mulFraction:(Fraction *)mulFraction anotherFraction:(Fraction *)anotherFraction;  // 乘法

- (void)yuefen:(Fraction *)a;    // 约分

- (id)addFraction:(Fraction *)addFraction anotherFraction:(Fraction *)anotherFraction;  // 加法

- (id)subFraction:(Fraction *)subFraction anotherFraction:(Fraction *)anotherFraction;  // 减法

- (id)divFraction:(Fraction *)divFraction anotherFraction:(Fraction *)anotherFraction;  // 除法

@end
